package model;

public class Attribute {
	
	private String namespace;
	private String name;
	private String value;
	
	public String getNamespace() {
		return namespace;
	}
	public void setNamespace(String namespace) {
		if (namespace == null){
			namespace = "";
		}
			
		this.namespace = namespace;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getValue() {
		return value;
	}
	public void setValue(String value) {
		this.value = value;
	}
	
	@Override
	public String toString() {
		String namespace = this.namespace.isEmpty() ? "" : this.namespace + ":";
		return new StringBuilder()
		       .append(namespace)
		       .append(name)
		       .append("=\"")
		       .append(value)
		       .append("\"")
		       .toString();
	}
	
	
}
